import './imports.js'
import '../components/header/header.scss'
import header from '../components/header/header.js';
import nav from '../components/nav/nav.js'
import { NEWS_TYPE } from '../data/index.js'

;((doc)=>{
   let app=doc.querySelector('#app')
   
   let  init=()=>{
       render()
   }

   function render(){
      let HeaderTPL=header.tpl({
          url:'/',
          title:'新闻头条',
          showLeftIcon:false,
          showRightIcon:true
      })
      let navTPL=nav.tpl(NEWS_TYPE)
      console.log(navTPL)
      app.innerHTML+=(HeaderTPL+navTPL)
   }

   init()
})(document);